package db.migration;

import net.jiastudy.core.base.BaseMigration;

public class V1_0_15__modify_task_receivel_dept extends BaseMigration {
    @Override
    public void migrate() throws Exception {
        if (isFieldExist("target_task", "receive_dept_id")) {
            jdbcTemplate.update("ALTER TABLE target_task CHANGE `receive_dept_id` `receive_dept_id` bigint unsigned DEFAULT NULL COMMENT '任务接收部门id';");
        }

        if (isFieldExist("target_task", "attachment_id")) {
            jdbcTemplate.update("ALTER TABLE target_task CHANGE `attachment_id` `attachment_id` bigint UNSIGNED DEFAULT NULL COMMENT 'attachment_Id';");
        }
    }
}
